//
// ITrack.java
// Copyright (C) 2010  "Naush" <naush _ hotmail _ fr>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>./* ----------------------------------------------------------------------------







package org.ryzom.nel.threed;

import org.ryzom.nel.misc.CRGBA;
import org.ryzom.nel.misc.CVector;

public class ITrack {
  private long swigCPtr;
  protected boolean swigCMemOwn;

  public ITrack(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  public static long getCPtr(ITrack obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        nel3dJNI.delete_ITrack(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  public IAnimatedValue eval(float date, CAnimatedValueBlock avBlock) {
    return new IAnimatedValue(nel3dJNI.ITrack_eval(swigCPtr, this, date, CAnimatedValueBlock.getCPtr(avBlock), avBlock), false);
  }

  public boolean getLoopMode() {
    return nel3dJNI.ITrack_getLoopMode(swigCPtr, this);
  }

  public void applySampleDivisor(long arg0) {
    nel3dJNI.ITrack_applySampleDivisor(swigCPtr, this, arg0);
  }

  public boolean applyTrackQuatHeaderCompressionPass0(CTrackSampleCounter arg0) {
    return nel3dJNI.ITrack_applyTrackQuatHeaderCompressionPass0(swigCPtr, this, CTrackSampleCounter.getCPtr(arg0), arg0);
  }

  public ITrack applyTrackQuatHeaderCompressionPass1(SWIGTYPE_p_unsigned_int arg0, CTrackSamplePack arg1) {
    long cPtr = nel3dJNI.ITrack_applyTrackQuatHeaderCompressionPass1(swigCPtr, this, SWIGTYPE_p_unsigned_int.getCPtr(arg0), CTrackSamplePack.getCPtr(arg1), arg1);
    return (cPtr == 0) ? null : new ITrack(cPtr, false);
  }

  public boolean interpolate(float time, SWIGTYPE_p_float res) {
    return nel3dJNI.ITrack_interpolate__SWIG_0(swigCPtr, this, time, SWIGTYPE_p_float.getCPtr(res));
  }

  public boolean interpolate(float time, SWIGTYPE_p_int res) {
    return nel3dJNI.ITrack_interpolate__SWIG_1(swigCPtr, this, time, SWIGTYPE_p_int.getCPtr(res));
  }

  public boolean interpolate(float time, CRGBA res) {
    return nel3dJNI.ITrack_interpolate__SWIG_2(swigCPtr, this, time, CRGBA.getCPtr(res), res);
  }

  public boolean interpolate(float time, CVector res) {
    return nel3dJNI.ITrack_interpolate__SWIG_3(swigCPtr, this, time, CVector.getCPtr(res), res);
  }

  public boolean interpolate(float time, SWIGTYPE_p_NLMISC__CQuat res) {
    return nel3dJNI.ITrack_interpolate__SWIG_4(swigCPtr, this, time, SWIGTYPE_p_NLMISC__CQuat.getCPtr(res));
  }

  public boolean interpolate(float time, SWIGTYPE_p_std__string res) {
    return nel3dJNI.ITrack_interpolate__SWIG_5(swigCPtr, this, time, SWIGTYPE_p_std__string.getCPtr(res));
  }

  public boolean interpolate(float time, SWIGTYPE_p_bool res) {
    return nel3dJNI.ITrack_interpolate__SWIG_6(swigCPtr, this, time, SWIGTYPE_p_bool.getCPtr(res));
  }

}
